package com.bootx.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToMany;

import java.util.HashSet;
import java.util.Set;

/**
 * @author black
 */
@Entity
public class WriteToolCategory extends OrderedEntity<Long>{

    private String name;

    /**
     * home:首页
     * create：创作
     * work：办公
     */
    private String type;

    @ManyToMany(mappedBy = "writeToolCategories", fetch = FetchType.LAZY)
    private Set<WriteTool> writeTools = new HashSet<>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<WriteTool> getWriteTools() {
        return writeTools;
    }

    public void setWriteTools(Set<WriteTool> writeTools) {
        this.writeTools = writeTools;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
